It's a happy ending. A month after G—'s first visit, he comes back to visit Dupin and the narrator. Surprise, surprise: Dupin has managed to find and snatch the letter. G— hands over a check for 50,000 francs and runs off, visions of major promotions dancing in his head.
But wait a minute: what does the letter say? Who sent it? What's the sender's relationship to the lady? Why is sneaky D— in such a position of power in the first place?
Doesn't matter. Sure, it's a little frustrating to get to the end and not know much more than you did when you started, but that's not the point. The point is for Dupin to regale us with an account of his cleverness and daring—and that's just what he does.
He also drops hints about his motives. As Poe fans, we know from "The Murders in the Rue Morgue" that Dupin has some financial issues, so the 50,000 franc check that G— cuts him is pretty good motivation.
And there's more. First, he has political and perhaps personal loyalty to the royal lady (120). Second, he wants revenge on D— for something "evil" he did to Dupin in the past (122). No big shock to fans of Poe, since most of Poe's tales revolve around revenge. In stories like "The Cask of Amontillado" and "The Black-Cat," the theme is explicit. Here it's more subtle, but the final lines suggest Dupin is just as interested in needling D— as he is in standing up for royalty.
So, we're guessing that the real trick here is that…there is no ending. Since we exit the story before the game is played out, we never know if the letter makes it back to the royal lady. Dupin has laid the bait, and now it's D—'s move.
But where's the evidence for this? Well, check out story's very last lines. Written in the "fake" letter that Dupin leaves for D—, they read:
"—Un dessein si funeste,
S'il n'est digne d'Atrée, est digne de Thyeste.
They are to be found in Crébillon's 'Atrée. (122)
In plain English, they mean something like "Such a mean plan is unworthy of Atreus, but totally worthy of Thyestes."
What, not so plain? The lines come from a "revenge tragedy" called Atrée et Thyeste, written (in French) in 1707 by a playwright called Prosper Jolyot, sieur de Crebillon. It features Atreus and Thyestes, two brothers from Greek mythology whose ruthless, bloody, and life-long feud gives new meaning to the phrase "sibling rivalry."
So, that's a little weird. Why would Dupin write a note that positions him as D—'s brother? And why are we just now hearing about an apparently bitter, life-long feud between two characters who we barely know?
One kind of out-there theory is that Dupin and D— are brothers, or perhaps even two different versions of the same person. Crazy, right? Well, crazy except for (1) their names have the same first initial, (2) they obviously know each other really well, (3) they think exactly alike, (4) they have a long-standing, intimate relationship.
Obviously they can't literally be the same person, because G— would probably pick up on that after following D— around for days. The point is that the ending emphasizes something we're all familiar with: the mastermind criminal and the mastermind detective are two versions of the same mind.